/*
*  SkyOpenALListener.h
*  
*
*  Created by Alexander Trutchenko on 11/02/12.
*  Copyright 2012 Free Team. All rights reserved.
*
*/

#ifndef __Sky_OpenALListener_h__
#define __Sky_OpenALListener_h__

#include "SkyTypes.h"

#include "stdlib.h"


namespace sky {

////////////////////////////////////////////////////////
//
/** SkyOpenALListener
*  
*/
////////////////////////////////////////////////////////

class SkyOpenALContext;

class SkyOpenALListener
{
	friend class SkyOpenALContext;

	SkyVector3D	 _position;				// listener's position
	SkyVector3D	 _velocity;				// listeners velocity (for Doppler effect)
	SkyVector3D	 _atDirection;			// listener's orientation - at vector
	SkyVector3D	 _upDirection;			// listener's orientation - up vector

private:
	SkyOpenALListener();
	~SkyOpenALListener(){;}

public:
	const SkyVector3D&	position() const { return _position; }
	void setPosition(const SkyVector3D& position);
	void moveBy(const SkyVector3D& deltaPos);

	const SkyVector3D&	velocity() const { return _velocity; }
	void setVelocity(const SkyVector3D& velocity);

	const SkyVector3D&	at() const { return _atDirection; }
	const SkyVector3D&	up() const { return _upDirection; }
	void setOrientation(const SkyVector3D& at, const SkyVector3D& up);
	
	void orientation(SkyVector3D* at_up) const;
	void setOrientation(const SkyVector3D* at_up);

}; //class SkyOpenALListener


} // namespace sky

#endif //__Sky_OpenALListener_h__
